home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / HippoDraw / HippoDrawSrc1.1 / Hippo.subproj / HDraw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-25  |  4.4 KB  |  161 lines

  1. /* HDraw    By Paul Kunz    June 1991
  2.  * derived from DrawApp in Draw, a NeXT, inc. example application
  3.  * Global object for application incorporating HippoDraw.
  4.  *
  5.  * Copyright (C)  1991  The Board of Trustees of
  6.  * The Leland Stanford Junior University.  All Rights Reserved.
  7.  */
  8.  
  9. #define HDRAW_H_ID "$Id: HDraw.h,v 1.16 1992/04/07 17:49:12 pfkeb Rel $"
  10.  
  11. #import <objc/Object.h>
  12.  
  13. #import <dpsclient/event.h>
  14. #import "hippo.h"
  15.  
  16. @interface HDraw : Object
  17. {
  18.     id theNewInspector;        /* the Panel holder for inspectors */
  19.     id tools;            /* the Tool Palette matrix */
  20.     id currentGraphic;        /* the factory object used to create things */
  21.     id savePanelAccessory;    /* the SavePanel Draw/PS/TIFF view */
  22.     id spamatrix;        /* the matrix in the savePanelAccessory view */
  23.     id plpAccessory;        /* accessory view in the page layout panel */
  24.     id infoPanel;        /* the Info... panel */
  25.     id legalPanel;        /* the Legal... panel */
  26.     id version;            /* the version field in the Info... panel */
  27.     id gridInspector;        /* the shared modal panel to inspect grids */
  28.     id inspectorPanel;        /* the shared inspector panel */
  29.     id inspectTuple;        /* the shared Tuple inspector */
  30.     id inspectData;        /* the shared ntuple column inspector */
  31.     id inspectPlot;        /* the shared Plot inspector and panel */
  32.     id inspectAxes;        /* the shared Axes inspector and View */
  33.     id inspectStat;        /* the shared Stat inspector and View */
  34.     id inspectCut;        /* the shared Cut inspector and panel */
  35.     BOOL cursorPushed;        /* whether we've temporarily changed the
  36.                    cursor to NXArrow because the user held
  37.                    down the Control key */
  38.     BOOL haveOpenedDocument;    /* whether we have opened a document */
  39. }
  40.  
  41. /* Public methods */
  42.  
  43. - addTuple:(ntuple) nt;
  44.  /*
  45.   * Create an HTuple object to handle the ntuple nt, add the handler
  46.   * to the list of handlers of open ntuples, and return HTuple id
  47.   * to the caller.   This method should be used to announce an
  48.   * externally created ntuple to the HippoDraw package.
  49.   */ 
  50.   
  51. + allocFromZone:(NXZone *)aZone;
  52.  /*
  53.   * Over-rides super class method in order to alloc from
  54.   * newly create NXZone named "HippoDraw".
  55.   */
  56.  
  57. + alloc;
  58.  /*
  59.   * Over-rides super class method in order to alloc from
  60.   * newly create NXZone named "HippoDraw".
  61.   */
  62.  
  63. + initialize;
  64. - init;
  65. - infoPanel:sender;
  66.  /*
  67.   * Load if needed and bring up Info Panel.
  68.   */
  69.  
  70. - legalPanel:sender;
  71.  /*
  72.   * Load the DoE boiler plate panel.
  73.   */
  74.   
  75. - currentGraphic;
  76. - currentDocument;
  77. - (const char *)currentDirectory;
  78.  
  79. /* Shared panels */
  80.  
  81. - saveToPanel;
  82. - saveAsPanel;
  83. - gridInspector;
  84. - inspectorPanel;
  85. - newInspector;
  86. - pageLayout;
  87. - orderFrontInspectorPanel:sender;
  88. - inspectPlot;
  89. - inspectCut;
  90. - orderFrontTupleInsp:sender;
  91.   /* Brings the Tuple inspector panel to view in NewInspector panel
  92.    */
  93.    
  94. - inspectTuple;
  95.   /* Returns the shared Tuple Inspector object
  96.    */
  97.    
  98. - orderFrontTools:sender;
  99.   /* Performs an orderFront to the panel containing the tools matrix 
  100.   */
  101.  
  102. /* Target/Action methods */
  103.  
  104. - help:sender;
  105. - new:sender;
  106. - open:sender;
  107.  
  108. - openTuple:sender;
  109.   /* If main window is a DrawDocument, then passes this message is
  110.      passed to it to open tuple binary file.   If main window is not
  111.      a DrawDocument, then is is created and message is passed to it.
  112.    */
  113. - openTupleAsText:sender;
  114.   /* Same as openTuple: except used for plain text tuple files.
  115.    */
  116.  
  117. - openTuple:pasteBoard
  118.     userData:(const char *)args
  119.     error:(char **)errorMsg;
  120.  /*
  121.   * Services method for reading pasteboard as ascii n-tuple.
  122.   */
  123.   
  124. - terminate:sender;
  125.  
  126. /* Application delegate methods */
  127.  
  128. - appDidInit:sender;
  129. - (int)appOpenFile:(const char *)path type:(const char *)type;
  130. - (BOOL)appAcceptsAnotherFile:sender;
  131.  
  132. /* Listener/Speaker methods */
  133.  
  134. - (int)msgDirectory:(char * const *)fullPath ok:(int *)flag;
  135. - (int)msgVersion:(char * const *)aString ok:(int *)flag;
  136. - (int)msgFile:(char * const *)fullPath ok:(int *)flag;
  137. - (int)msgPrint:(const char *)fullPath ok:(int *)flag;
  138. - (int)msgSelection:(char * const *)bytes length:(int *)len
  139.     asType:(const char *)aType ok:(int *)flag;
  140. - (int)msgCopyAsType:(const char *)aType ok:(int *)flag;
  141. - (int)msgCutAsType:(const char *)aType ok:(int *)flag;
  142. - (int)msgPaste:(int *)flag;
  143.  
  144. /* Global cursor setting methods */
  145.  
  146. - cursor;
  147. - sendEvent:(NXEvent *)event;
  148.  
  149. /* Menu updating method */
  150.  
  151. - (BOOL)menuItemUpdate:menuCell;
  152.  
  153. /* Target/Action method which sets the currentGraphic instance variable */
  154.  
  155. - setCurrentGraphic:sender;
  156.  
  157. @end
  158.  
  159.  
  160.  
  161.